#ifndef CRC_H
#define CRC_H

#include <stdint.h>

#ifdef __cplusplus
extern "C" {
#endif


void CRC16(uint8_t *data, uint8_t *crc, uint8_t len, uint8_t CrcTp);
unsigned char crc_8n(unsigned char *ptr, unsigned char n);
uint16_t crc16_modbus(uint8_t *puchMsg, uint16_t usDataLen);
uint16_t crc16_xmodem(const uint8_t* data, uint32_t size);


#ifdef __cplusplus
}
#endif

#endif // CRC_H
